var httpsUrl = getApp().globalData.httpsUrl;
var globalData = getApp().globalData;
var commonUtil = require("../../../utils/commonUtil.js")
var WxParse = require("../../../wxParse/wxParse.js")
Page({
  data: {
    imgUrl: globalData.imgUrl,
    info: [],
    content: "",
  },
  info: function () {
    var that = this;
    var params = new Object();
    params.pageNo = 1;
    params.pageSize = 1;
    params.type = 1;
    let openId = wx.getStorageSync("openidKey");
    wx.request({
      header: { "openId": openId, "content-Type": "application/x-www-form-urlencoded" },
      url: httpsUrl + "/article/getArticleList",//1.帮赚钱攻略   2.联盟卡攻略  3.劵攻略   4.海报攻略
      dataType: "json",
      method: "GET",
      data: params,
      success: function (res) {
        console.log("res：" + JSON.stringify(res));
        var content = '<div>' + res.data.list[0].content + '</div>';
        let contentTemp = WxParse.wxParse('content', 'html', content, that, 5);
        that.setData({ content: contentTemp })
      }
    })
  },

  onLoad: function (options) {
    this.info();
  },

  onShareAppMessage: function () {

  }
})